# Contributor: Guy Godfroy <guy.godfroy@gugod.fr>
# Maintainer: Guy Godfroy <guy.godfroy@gugod.fr>
pkgname=apprise
pkgver=1.7.6
pkgrel=0
pkgdesc="Push Notifications that work with just about every platform"
url="https://github.com/caronc/apprise"
arch="noarch"
license="BSD-2-Clause"
depends="py3-certifi py3-requests py3-requests-oauthlib py3-click py3-markdown py3-yaml"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-mock"
subpackages="$pkgname-doc $pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://codeload.github.com/caronc/apprise/tar.gz/refs/tags/v$pkgver"
options="net"

case "$CARCH" in
s390x|x86)
	options="$options !check" # some tests fail on package builders
	;;
esac

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	sh bin/test.sh
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl
	install -Dm644 packaging/man/apprise.1 -t "$pkgdir"/usr/share/man/man1
}

sha512sums="
be1469b26c72255b95a055073e8ba2e147fb66a79bbdc82d38dbd765d059d7f9d4b6142728a2e583d4ad2370d489303c342500f472946fabd41f01463d2a1fde  apprise-1.7.6.tar.gz
"
